#ifndef SIMPLE_JSON_H
#define SIMPLE_JSON_H

#include "basic.h"

typedef enum { TYPE_INT = 0, TYPE_FLOAT, TYPE_BOOL, TYPE_MAX } type_t;

typedef struct {
  const char *key;
  type_t type;
  void *data;
} get_param_t;

int mjson_parase(const char *_str, get_param_t *param, int len);
int mjson_get_int(const char *_str, const char *key, int *value);
int mjson_get_float(const char *_str, const char *key, float *value);
int mjson_get_bool(const char *_str, const char *key, bool *value);

#endif